// 布局页面状态管理
export default {
  namespaced: true,
  state: {
    userName: '',
    userId: '',
    userImage: ''
  },
  mutations: {
    // 设置userInfo
    _setUserInfo(state, data) {
      state.userName = data.userName
      state.userId = data.userId
    },
    // 设置头像
    _setUserImage(state, imgurl) {
      state.userImage = imgurl
    }
  },
  actions: {
    setUserInfo({ commit }, data) {
      commit('_setUserInfo', data)
    },
    setUserImage({ commit }, imgurl) {
      commit('_setUserImage', imgurl)
    }
  },
  getters: {}
}
